# Contributor: Ondrej Martinak <omartinak@gmail.com>

pkgname=vifm-git
pkgver=20090822
pkgrel=1
pkgdesc="Ncurses based file manager with vi like keybindings."
arch=('i686' 'x86_64')
url="http://vifm.sourceforge.net/"
license=('GPL')
depends=('bash' 'ncurses')
makedepends=('git')
conflicts=('vifm')
provides=('vifm')

_gitroot=git://vifm.git.sourceforge.net/gitroot/vifm/vifm
_gitname=vifm

build() {
	cd ${srcdir}

	msg "Connecting to GIT server..."

	if [ -d $_gitname ]; then
		cd $_gitname && git pull origin
		cd ..
		msg "The local files are updated."
	else
		git clone $_gitroot
	fi

	msg "GIT checkout done or server timeout"
	msg "Starting make..."

	cd $_gitname

	./configure --prefix=/usr
	make || return 1
	make DESTDIR=${pkgdir} install
}

